package lab02.test05;

public class Cube {
    private float length;
    private float width;
    private float height;
    //初始化
    public Cube(float l,float w,float h ){
        this.setLength(l);
        this.setWidth(w );
        this.setHeight(h);
    }
    public float V(){
        float vm;
        vm=length*width*length;
        return vm;

    }
//函数

    public float getLength() {
        return length;
    }

    public void setLength(float length) {
        this.length = length;
    }

    public float getWidth() {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

    public float getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }
}


